for n in range(3):
   name = input("请输入用户名:")
   key = input("请输入密码:")
   if name == 'kate' and  key=='666666': 
      print("登陆成功")
      break
else:
   print ("用户名或密码错误")
